package com.sjgs.gis.repository;

import com.sjgs.gis.domain.DataFile;
import org.springframework.data.mongodb.repository.ReactiveMongoRepository;
//import org.springframework.data.r2dbc.repository.Query;
//import org.springframework.data.r2dbc.repository.R2dbcRepository;
import org.springframework.data.r2dbc.repository.R2dbcRepository;
import org.springframework.stereotype.Repository;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

@Repository
public interface DataFileRepository extends R2dbcRepository<DataFile, Long> {
    //文件秒传验证
    Mono<DataFile> findByFkeyAndStatusGreaterThan(String fkey, Integer status);
    Mono<DataFile> findByFkeyAndStatusLessThanEqual(String fkey, Integer status);
    Flux<DataFile> findAllByFkeyEndsWith(String fname);

    Flux<DataFile> findAllByFkey(String fkey);

    Mono<DataFile> findByFkeyAndStatus(String fkey, Integer status);

    Mono<DataFile> findByFkey(String fkey);
}
